{% block styles %}
  <link rel="stylesheet" href="{{asset('bundles/pimuser/css/unlock-banner.css', 'frontend')}}" />
{% endblock %}

{% block scripts %}
    <script type="text/javascript" nonce="{{ js_nonce() }}">
      (function () {
        const today = new Date();
        const start = new Date("2023-02-07T00:00:00");
        const end = new Date("2023-03-09T23:59:59");

        if (today < start || today > end) {
          return;
        }

        const REGISTRATION_URL = 'https://unlock.akeneo.com/2023-Paris?utm_source=loginpage&utm_medium=adl&utm_campaign=2023%20-%20WW%20-%20Unlock%20Paris';
        const illustration = document.querySelector('.IllustrationLogin');

        if (!illustration) {
          return;
        }

        const link = document.createElement('a');
        link.href = REGISTRATION_URL;
        link.target = '_blank';
        link.title = 'Register Now'
        link.textContent = 'Register Now';


        illustration.classList.add('UnlockBanner--enabled');
        illustration.append(link);
      })();
    </script>
{% endblock %}
